<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.11.0.min.js"></script>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<title>Insert title here</title>

<style type="text/css">
body{
/* background:url(images/beijing1.png) no-repeat;background-size:100% 100%;  */
background-color: #defae5;
}

body div{float: left;
}
.main{
margin-bottom:50px;
}
.main div,.main{border:0px solid #999;background-color: white;
}
</style>

<script type="text/javascript">
	$(function(){
		if("${user}"==""){
			$('.userinfo').css('display','none');
		}else{
			$('.login_register').css('display','none');
		}
	})
</script>

<script type="text/javascript">
	$(function(){
		if("${user}"==""){
			$('.button').attr('disabled','disablde');
		}else{
		}
	})
</script>

</head>
<body>

	<div class = "top1" style = "width:100%;height:40px;background-color: green;">
		<div class = "userinfo" style = "margin-left: 1100px;width:400px;">
			<div class = "head" style = "margin-top:2px;width:35px;height: 35px;border-radius:40px;background-color: white;">
				<img alt="" src="${user.path }" style="width:100%;height: 100%;border-radius:40px;">
			</div>
			<div class = "username" style = "color:white;margin-top:2px;width:150px;height: 40px;line-height: 40px;margin-left: 5px;">
				${user.userName }
			</div>
		</div>
		
		<div class = "login_register" style="margin-left: 1100px;">
			<a href = "${pageContext.request.contextPath }/login.jsp" style="color:white;text-decoration: none; line-height: 40px;" >
				登录
			</a>
			<a href = "${pageContext.request.contextPath }/register.jsp" style="color:white;text-decoration: none;">
				&nbsp&nbsp&nbsp注册
			</a>
		</div>
		
	</div>
	
	
	<div class = "word4" style="font-size: 25px;margin-left:250px;;font-weight: bold;color:white;background-color:green;line-height: 50px;width:782px;margin-top:20px;text-align: left;padding-left:20px;">
		<b style = "font-size: 40px;">☠</b>&nbsp提出问题
	</div>
	<form action="${pageContext.request.contextPath }/SendQuestionServlet?userID=${user.userID}" >
	<div class = "main" style="margin-top:0px;width:800px;height:600px;border:1px solid #ccc;border-top:0px solid green;margin-left: 250px;">
		<div class = "word" style="font-size: 50px;font-weight: bold;color:green;line-height: 50px;width:98%;margin-top:20px;text-align: center;">
			我要提问
		</div>
		<div class = "middle" style="width:90%;height:30px;margin-top:30px;margin-left: 50px;margin-bottom: 30px;">
			<div class = "word1" style = "">
				问题：&nbsp&nbsp
			</div>
			<div class = "">
				<input type = "text" name="question" placeholder = "请输入问题"  class = "input1" style="width:550px;height:20px;"> 
			</div>
		</div>
		<div class = "bottom" style="margin-left: 20px;">
			<div class = "word2">
				问题补充：&nbsp&nbsp
			</div>
			<div class = "">
				<textarea rows="" name="detail" placeholder = "请输入问题详细描述" cols="" class = "input2"  style="width:550px;height:300px;"></textarea>
			</div>
		</div>
		<div class = "submitbuttondiv" style="width:90%;height:40px;margin-top:10px; margin-left: 20px;">

		<input type = "" style = "display: none;" name = "queUserID" value = "${user.userID }" >
				<input type = "submit" class = "button" value = "提交问题" disabled="disabled" style="display: block;margin-left:550px;text-align:center;background-color:green;width:100px;height:30px;line-height: 30px;color:white;">
			
			

		</div>
	</div>
	</form>
	<a href = "${pageContext.request.contextPath }/ConversationServlet">
		返回花卉论坛
	</a>
</body>

<script type="text/javascript">
	$(function(){
		
		$('.input1').keyup(function(){
			if($('.input1').val()==""){
				$('.button').attr('disabled','disabled');
			}else if($('.input2').val()!=""){
				$('.button').removeAttr('disabled');
			}
		});
		
		$('.input2').keyup(function(){
			if($('.input2').val()==""){
				$('.button').attr('disabled','disabled');
			}else if($('.input1').val()!=""){
				$('.button').removeAttr('disabled');	
			}
		});
		
	})
</script>

</html>